package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.domain.Assessment;
import com.itheima.service.AssessmentService;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("/assessment")
@ResponseBody
public class AssessmentController {


    @Reference
    private AssessmentService assessmentService;

    //风险评估
    @RequestMapping("/Estimate")
    public List<Assessment> EstimateFindAll(){
        List<Assessment> assessmentList = assessmentService.EstimateFindAll();
      /*  ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("assessmentList",assessmentList);
        modelAndView.setViewName("Estimate");*/
        return assessmentList;
    }
    //模糊查询
    @RequestMapping("/EstimateCondition")
    public List<Assessment> EstimateConditionFindAll(){
        List<Assessment> EstimateConditionList = assessmentService.EstimateConditionFindAll();
        /*ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("assessmentList",assessmentList);
        modelAndView.setViewName("Estimate");*/
        return EstimateConditionList;
    }
    //删除








    //体质测评
    @RequestMapping("/Physique")
    public List<Assessment> PhysiqueFindAll(){
        List<Assessment> PhysiqueList = assessmentService.PhysiqueFindAll();
        return PhysiqueList;
    }
    //模糊查询
    @RequestMapping("/PhysiqueCondition")
    public List<Assessment> PhysiqueConditionFindAll(){
        List<Assessment> PhysiqueConditionList = assessmentService.PhysiqueConditionFindAll();
        return PhysiqueConditionList;
    }
    //删除








    //心理测评

    @RequestMapping("/Psychology")
    @ResponseBody
    public List<Assessment> PsychologyFindAll() {
        List<Assessment> PsychologyList = assessmentService.PsychologyFindAll();
        return PsychologyList;
    }
    //模糊查询
    @RequestMapping("/PsychologyCondition")
    public List<Assessment> psychologyConditionFindAll(){
        List<Assessment> PsychologyConditionList = assessmentService.PsychologyConditionFindAll();

        return PsychologyConditionList;
    }
    //删除




}
